﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace WxTenpay.Service.Model
{

    /// <summary>
    /// 角色管理表
    /// </summary>
    public class SysRoleEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { set; get; }

        public string GuId { set; get; } = Guid.NewGuid().ToString();

        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { set; get; } = "";

        /// <summary>
        /// 角色编号 
        /// </summary>
        public string Number { set; get; } = "";


        /// <summary>
        /// 角色备注 
        /// </summary>
        public string Remark { set; get; } = "";


        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTime { set; get; } = "";



        /// <summary>
        /// 新增方法
        /// </summary>
        public void Create()
        {
            if (string.IsNullOrWhiteSpace(this.GuId))
                this.GuId = Guid.NewGuid().ToString();
            if (string.IsNullOrWhiteSpace(this.CreateTime))
                this.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        }
    }
}
